BEGIN;
--
-- Create model Article
--
CREATE TABLE "article_article" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "headline" varchar(100) NOT NULL);
--
-- Create model Publication
--
CREATE TABLE "article_publication" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "title" varchar(30) NOT NULL);
--
-- Add field publications to article
--
CREATE TABLE "article_article_publications" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "article_id" integer NOT NULL REFERENCES "article_article" ("id"), "publication_id" integer NOT NULL REFERENCES "article_publication" ("id"));
CREATE UNIQUE INDEX "article_article_publications_article_id_publication_id_67858940_uniq" ON "article_article_publications" ("article_id", "publication_id");
CREATE INDEX "article_article_publications_article_id_986d8da5" ON "article_article_publications" ("article_id");
CREATE INDEX "article_article_publications_publication_id_4765b3de" ON "article_article_publications" ("publication_id");
COMMIT;
